rg chromaticity

The rg chromaticity space, two dimensions of the normalized RGB space,[1] is a chromaticity space, a two-dimensional color space in which there is no intensity information.

In the RGB color space a pixel is identified by the intensity of red, green, and blue primary colors. Therefore a bright red can be represented as (R,G,B) (255,0,0), while a dark red may be (40,0,0). In the normalized rgb space or rg space, a color is represented by the proportion of red, green, and blue in the color, rather than by the intensity of each. Since these proportions must always add up to a total of 1, we are able to quote just the red and green proportions of the color, and can calculate the blue value if necessary.

Although rg chromaticity contains less information than RGB or HSV color spaces, it has a number of useful properties for computer vision applications. Notably, where a scene viewed by a camera is not lit evenly – for example if lit by a spotlight – then an object of a given color will change in apparent color as it moves across the scene. Where color is being used to track an object in an RGB image, this can cause problems. The lack of intensity information in rg chromaticity images removes this problem, and the apparent color remains constant. Note that in the case where different parts of the image are lit by different colored light sources, problems can still emerge.

Conversion between RGB and rg chromaticity

Given a color (R,G,B) where R, G, B = intensity of Red, Green and Blue, this can be converted to color (r,g) where  r, g imply the proportion of red and green in the original color:

 r = \frac{R}{R%2BG%2BB}
 g = \frac{G}{R%2BG%2BB}

The reverse conversion is not possible, as the intensity information is lost during the conversion to rg chromaticity, e.g. (1/3, 1/3) has equal proportions of each color, but it is not possible to determine whether this corresponds to dark gray, light gray, or white.

Illustration

A photograph with varying illumination levels.
A visual representation of the chromaticity of the image. Each pixel has been scaled so the total red, green, and blue coordinates sum to 1. Notice the effect on the foliage and shadowed regions.
A visual representation of the average value of red, green, and blue coordinates for each pixel in the original image. This information can be combined with the rg chromaticity information to reconstruct the original image.

References

  1. ^ J. B. Martinkauppa and M. Piettikäinen (2005). "Facial Skin Color Modeling". In S. Z. Li and Anil K. Jain. Handbook of face recognition. Springer Science & Business. p. 117. ISBN 9780387405957. http://books.google.com/books?id=amVDaTdgKYcC&pg=PA117&dq=%22normalized+RGB%22+rg#v=onepage&q=%22normalized%20RGB%22%20rg&f=false. 

2. http://www.museumstuff.com/learn/topics/RG_Chromaticity::sub::Conversion_Between_RGB_And_Rg_Chromaticity